var $ = require('jquery');
var html = require('./index.html');
var clueTabs = require('../clueTabs');
var clueContent = require('../clueContent');
var $clueInfoTmp = $(html);

/**
 *
 * @param $parent,父容器
 * @param activeType,供应商主动找维修厂,activeType='store'
 * @param tabType
 * @param info
 * @returns {ClueInfo}
 */
exports.create = function ($parent, tabType, info) {
  var $clueInfo = $clueInfoTmp.clone();
  //在线索信息栏添加tabs
  var $clueTabs = clueTabs.create($clueInfo.find('ul.im-clue-tab'), tabType);
  var $clueContent = clueContent.create($clueInfo.find('.im-clue-content'), tabType, info);
  $parent.append($clueInfo);
  return new ClueInfo($clueTabs, $clueContent);
};

function ClueInfo(clueTabs, clueContent) {
  this.clueTabs = clueTabs;
  this.clueContent = clueContent;
}

